public class Solution {
    public int Add(int num1,int num2) {
        while(num2 != 0){
            int tmp = num1 ^ num2;  //获得各位之和（不进位）比如0010和0011 异或之后0001
            num2 = (num1 & num2) << 1;  //获得进位值 比如0010和0011 进位就是0100
            num1 = tmp;
        }
        return num1;
    }
}